import { BattleSkill } from '.';
import {
  BATTLE_SKILL_DATA,
  type BattleSkillConfig,
} from '../../data/battle-skill';

export class BattleSkillFactory {
  public static createBattleSkillById(id: string): BattleSkill | null {
    const skill = BATTLE_SKILL_DATA.find((s) => s.id === id);
    if (!skill) return null;
    return new BattleSkill(skill);
  }

  public static createBattleSkillByConfig(
    config: BattleSkillConfig
  ): BattleSkill {
    return new BattleSkill(config);
  }
}
